package com;
import java.io.*;
public class OutputStream {
    public static void main(String[] args) throws Exception {
        File file = new File("D:" + File.separator + "baidu" + File.separator + "www.baidu.txt");
        if (!file.getParentFile().exists()) {
            file.getParentFile().mkdirs();
        }
        FileOutputStream output =new FileOutputStream(file);
        String message = "www.baidu.com";
        byte data[] = message.getBytes();
        output.write(data);
        output.close();
    }
}
